<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>2D变化-汽车效果</title>
    <style>
      .box {
        position: relative;
        width: 1000px;
        height: 400px;
        border: 1px solid red;
        margin: 0 auto;
      }

      .car {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 400px;
        transition: all 3s cubic-bezier(0.65, 0.05, 0.36, 1);
      }

      .car .carimg {
        width: 100%;
      }

      .car .lt-r,
      .car .lt-l {
        position: absolute;
        top: 75px;
        right: 76px;
        width: 53px;
        transition: all 3s cubic-bezier(0.65, 0.05, 0.36, 1);
      }

      .car .lt-l {
        position: absolute;
        top: 75px;
        right: 289px;
        width: 53px;
      }

      .box:hover .car {
        transform: translate(-600px, -50%);
      }

      .box:hover .lt-r,
      .box:hover .lt-l {
        transform: rotate(-360deg);
      }
    </style>
  </head>

  <body>
    <div class="box">
      <div class="car">
        <img src="./img/car.webp" alt="" class="carimg" />
        <img src="./img/wj.webp" alt="" class="lt-r" />
        <img src="./img/wj.webp" alt="" class="lt-l" />
      </div>
    </div>
  </body>
</html>
